{% extends "mainTemplate.html" %}

{% block title %}The Living History: Register{% endblock %}
	
{% block alert %}
	{% if not current_user.is_authenticated %}
		<p>	User registration currently requires a Google account.	</p>
		<p> <a href="{{current_user.log_url}}">Click here to log in with your Google account.</a></p>
	
	{% else %}
		<p>Logged into Google as: <b>{{current_user.google_username}}</b></p>
	{% endif %}
{% endblock alert %}
		
	
{% block display %}

	{% if current_user.is_authenticated %}
		
		<form action="/register" method="post">
		<p>To protect your email address, choose a username to identify you on The Living History.</p>
		<table>
		     <tr>
		    <td>Username:</td>
			<td><input type="Text" name="username" size="25"></td>
		  </tr>
		  <tr>
		  <td align="center" colspan="2"><input type="Submit" name="register" value="Register"></td>
		  </tr>
		</table>
		</form>
	
	{% endif %}	

{% endblock display %}
